package com.play.mapper;

import com.play.model.Student;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

/**
 *
 * @author Administrator
 * @date 2018/7/18
 */
@Repository
public interface UserMapper {
    /**
     * 通过Uid查询Student
     * @param Uid
     * @return
     */
    @Select("select * from student where SNO = #{Uid}")
    Student findByUid(@Param("Uid") String Uid);

    /**
     * 添加Student
     * @param Uid
     * @param UName
     * @return
     */
    @Insert("insert into student (SNO,SNAME) values (#{Uid},#{UName})")
    boolean insertStudent(@Param("Uid") String Uid,@Param("UName") String UName);
}
